<!DOCTYPE html>
<html>

<head>
    <include file="public@head" title="菜单管理" keywords="后台管理系统"/>
</head>

<body class="layui-layout-admin">
<include file="public@header"/>
<include file="public@side"/>
<div class="layui-body">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a href="{:url('admin/index/index')}">主页</a>
        <a>系统设置</a>
        <a href="{:url('index')}">菜单管理</a>
        <a href="{:url('add')}"><cite>添加菜单</cite></a>
    </div>

    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-card-header">
                添加菜单
            </div>
            <div class="layui-card-body layui-row">
                <form method="post" class="layui-form layui-col-md8 layui-col-lg6" action="{:url('add')}">
                    <div class="layui-form-item">
                        <label class="layui-form-label">父级名称</label>
                        <div class="layui-input-inline">
                            <select name="pid" lay-filter="menu" class="layui-select">
                                <option value="0">--默认顶级--</option>
                                <foreach name="admin_menu_level_list" item="vo">
                                    <option <if condition="$pid eq $vo['id']"> selected="selected" </if> value="{$vo.id}">{$vo.str}{$vo.title}
                                    </option>
                                </foreach>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">菜单名称<span class="form-required">*</span></label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" name="title" lay-verify="required" lay-verType="tips"
                                   placeholder="请输入菜单名称">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">URL</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" name="name"
                                   placeholder="模块名/控制器/方法 如：admin/Index/index">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label for="input-status" class="layui-form-label">是否显示</label>
                        <div class="layui-input-inline">
                            <input type="radio" name="status" value="1" title="启用" checked="checked">
                            <input type="radio" name="status" value="0" title="禁用">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-inline">
                            <input type="number" name="sort" value="0" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button type="submit" class="layui-btn" lay-submit lay-filter="general">添加</button>
                            <a class="layui-btn layui-btn-primary" href="javascript:history.back(-1);">返回</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<include file="public@scripts"/>
</body>

</html>
